﻿using Abp.Domain.Repositories;
using Abp.Domain.Services;
using System;

namespace AVIS.OutBound.OrderPay
{

    public class PayGatewayLogManager : DomainService, IPayGatewayLogManager
    {

        private readonly IRepository<PayGatewayLog> _repository;

        public PayGatewayLogManager(IRepository<PayGatewayLog> repository){
            _repository = repository;
        }

        public void Save(PayGatewayLog payGatewayLog)
        {
            if (payGatewayLog == null){
                throw new Exception("保存失败!");
            }
            payGatewayLog.CreateDate = Abp.Timing.Clock.Now;
            _repository.Insert(payGatewayLog);
        }
    }
}
